<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
	 <!-- Required meta tags -->
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
  <title>Purple Admin</title>
  <!-- plugins:css -->
  <link rel="stylesheet" href="../../vendors/iconfonts/mdi/css/materialdesignicons.min.css"/>
  <link rel="stylesheet" href="../../vendors/css/vendor.bundle.base.css"/>
  <!-- endinject -->
  <!-- plugin css for this page -->
  <link rel="stylesheet" href="../../node_modules/jqvmap/dist/jqvmap.min.css" />
  <!-- End plugin css for this page -->
  <!-- inject:css -->
  <link rel="stylesheet" href="../../css/style.css"/>
  <!-- endinject -->
  <link rel="shortcut icon" href="../../images/favicon.png" />


</head>
<body>
	<div class="col-lg-12 stretch-card">
              <div class="card">
                <div class="card-body">
                  <h4 class="card-title">
				  <button type="button" class="btn btn-gradient-primary btn-rounded btn-icon">
                          <i class="mdi mdi-home-outline"></i>
                        </button>
					<!-- <i class="mdi mdi-home-variant"></i>	 -->
				  <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">首页/财务管理/本金收款台账</font></font></h4>

                    <form id="MyForm" method="post" th:action="@{/ysy/qryConditionPageAll}">
                        <span>借款编号</span>
                        <!--<input name="queryUserRole"  type="text" th:value="${queryUserRole}"/>-->
                        <input name="queryUserRole"  type="text" style="width:50px;height:26px"/>
                        <span>借款人</span>
                        <!--<input name="queryname" class="input-text" type="text" th:value="${queryname}"/>-->
                        <input name="queryname" class="input-text" type="text" style="width:130px;height:26px"/>

                        <button type="button" class="btn btn-gradient-primary btn-icon-text">
                            <i class="mdi mdi-file-check btn-icon-prepend"></i><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                            查询
                        </font></font></button>

                    </form>
				  
                  <span class="card-description"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                    数据列表 </font></font>
                  </span>
				  <div style="position:relative;left:87%;">
				  <button type="button" class="btn btn-gradient-danger"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">对账确认</font></font></button>
                  </div>
				  <table class="table table-bordered">
                    <thead>
                      <tr>
                        <th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          全选
                        </font></font></th>
                        <th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          借款编号
                        </font></font></th>
                        <th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          借款人
                        </font></font></th>
                        <th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          期限
                        </font></font></th>
						<th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          收款本金(元)
                        </font></font></th>
						<th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          放款时间
                        </font></font></th>
						<th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          放款方式
                        </font></font></th>
						<th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          对账人员
                        </font></font></th>
						<th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          对账日期
                        </font></font></th>
						<th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          对账状态
                        </font></font></th>
						<th><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                          操作
                        </font></font></th>
                      </tr>
                    </thead>
                    <tbody>
                    <tr th:attr="id=${user.userId}+'_row'" th:each="user:${queryUserList}">
                        <td><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                            <input type="checkbox"/>
                            <input type="hidden" th:attr="id=${user.userId }+'_userId'" th:value="${user.userId}"/>
                        </font></font></td>
                        <td th:text="${user.borrowOrder.boId}"></td>
                        <td th:text="${user.userName}"></td>
                        <td th:text="${user.borrowOrder.oLoanTime}"></td>
                        <td>0.00</td>
                        <td th:text="${user.borrowOrder.oCreateTime}"></td>
                        <td th:text="${user.loanType.lName}"></td>
                        <td th:text="${user.yVerify.verifyName}"></td>
                        <td th:text="${user.yVerify.verifyDate}"></td>
                        <!--<td th:text="${user.yVerify.verifyStatus}"></td>-->
                        <td th:if="${user.yVerify.verifyStatus eq 1}" th:text="未对账"></td>
                        <td th:if="${user.yVerify.verifyStatus eq 2}" th:text="已对账"></td>
                        <td th:if="${user.yVerify.verifyStatus eq 3}" th:text="异常"></td>
                        <td th:if="${user.yVerify.verifyStatus eq 4}" th:text="冲正"></td>
                        <td><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">
                            <a href="#">查看详情</a>
                        </font></font></td>
                    </tr>
                    </tbody>
                  </table>
                    <div class="page-bar">
                        <ul class="page-num-ul clearfix">
                            <li>共<span th:text="${page.totalCount }"></span>条记录&nbsp;&nbsp; <span th:text="${page.pageIndex}"></span>/<span th:text="${page.totalPageCount}"></span> 页</li>
                            <button th:onclick="'javascript:pageQry(document.forms[0],1)'" th:if="${page.pageIndex gt 1 }">首页</button>
                            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.pageIndex - 1}+')'"  th:if="${page.pageIndex gt 1 }">上一页</button>

                            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.pageIndex + 1}+')'" th:if="${page.pageIndex lt page.totalPageCount}">下一页</button>
                            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.totalPageCount}+')'" th:if="${page.pageIndex lt page.totalPageCount}">最后一页</button>
                            &nbsp;&nbsp;
                        </ul>
                        <span class="page-go-form"><label>跳转至</label>
                     <input type="hidden" id="totalPageCount" th:value="${page.totalPageCount}"/>
                     <input type="text" name="inputPage" id="inputPage" class="page-key"/>页
                     <button type="button" class="page-btn"
                     th:onClick="'jumpPage(document.forms[0],document.getElementById(\''+inputPage+'\').value)'">GO</button>
		                </span>
                    </div>
                </div>
              </div>
            </div>
    <script type="text/javascript" th:src="@{/js/jquery-1.8.3.min.js}"></script>
    <script type="text/javascript" th:src="@{/layer/layer.js}"></script>
    <script type="text/javascript" th:src="@{/js/time.js}"></script>
    <script type="text/javascript">
        //01.分页查询
        function pageQry(form, pageIndex) {
            // form.currentPageNo.value = pageIndex;//赋值给【分页+条件查询的表单】
            // form.submit();//用js主动提交
            $.ajax({
                type:"post",
                url:"/ysy/receivables?currentPageNo="+pageIndex+"",
                data:"page=1",
                success: function(){
                    $("#Conframe").load("/ysy/receivables?currentPageNo="+pageIndex+"");
                },
                error:function () {
                    alert("错误");
                }
            })
        }

        //02.跳转页查询
        function jumpPage(form, jumpPageIndex) {
            //01.数字校验
            var reg = /^[1-9]\d{0,}$/;
            if (!reg.test(parseInt(jumpPageIndex))) {
                alert("请输入合法的数字");
                return;
            }
            //02.范围校验：当前页不能大于总页数
            if (jumpPageIndex > document.getElementById("totalPageCount").value) {
                alert("已经是最后一页!");
                return;
            }
            // form.currentPageNo.value = jumpPageIndex;
            // form.submit();
            $.ajax({
                type:"post",
                url:"/ysy/receivables?currentPageNo="+jumpPageIndex+"",
                data:"page=1",
                success: function(){
                    $("#Conframe").load("/ysy/receivables?currentPageNo="+jumpPageIndex+"");
                },
                error:function () {
                    alert("错误");
                }
            })
        }
    </script>
</body>
</html>